package com.springboot.frame.oauth.server.model;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 资源表
 * </p>
 *
 * @author liheng
 * @since 2020-08-28
 */
@Data
@TableName("sys_resources")
public class SysResources implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @TableField(value = "path")
    private String path;

    @TableField("action")
    private String action;


    /**
     * 资源名
     */
    @TableField("title")
    private String title;

    /**
     * 资源描述
     */
    @TableField("descriptions")
    private String descriptions;

    /**
     * 排序
     */
    @TableField("sort")
    private Integer sort;

    /**
     * 菜单或按钮图标
     */
    @TableField("icon")
    private String icon;

    /**
     * 类型为页面时，代表前端路由地址，类型为按钮时，代表后端接口地址
     */
    @TableField("url")
    private String url;

    /**
     * 权限类型，页面-1，按钮-2
     */
    @TableField("cate")
    private Integer cate;

    @TableField("bothway")
    private Boolean bothway;


    /**
     * 权限表达式，定位按钮，需自定义
     */
    @TableField("permission")
    private String permission;

    /**
     * 后端接口访问方式
     */
    @TableField("method")
    private String method;

    /**
     * 父级id
     */
    @TableField("parent_id")
    private Integer parentId;

    /**
     * 删除  未删除
     */
    @TableField("enable")
    @TableLogic
    private Integer enable;

    @TableField("createtime")
    private LocalDateTime createtime;

    @TableField("lasttime")
    private LocalDateTime lasttime;



}
